A near field communication (NFC) technology is a wireless communications technology that enables two devices with a distance of 10 centimeters to exchange data. According to the NFC technology, a mobile device may be used either as a contactless card or as a card reader, to provide capabilities of payment, payment, ticket, and access control of an application program.
Currently, an NFC chip is usually integrated into a mobile device, and corresponding data is stored in a subscriber identity module (SIM) card of the mobile device, so that the mobile device has an NFC function. The NFC chip integrated into the mobile device has only two power ports, a first power port and a second power port. When the mobile device is powered on, some modules that can supply power in the mobile device may supply power to the first power port (for example, a modem in the mobile device may supply power to the first power port). After the mobile device is powered off, a built-in battery on the NFC chip may supply power to the first power port. When the mobile device performs near field communication (e.g., card reading), a level signal triggered by the NFC chip in the mobile device may be presented on the second power port.
FIG. 1 shows a current mobile device that supports dual SIM cards and that is integrated with an NFC chip. The mobile device has two SIM card slots. Different SIM cards may be separately inserted in the two SIM card slots, and different information may be stored in the different SIM cards. For example, bank account information is stored in a SIM card 1 inserted in a SIM card slot 1, and transportation card information is stored in a SIM card 2 inserted in a SIM card slot 2. In this way, a user may choose to read different SIM cards according to an application scenario, to perform an operation on different accounts. The SIM card slot 1 may be connected to a first power port VCC on the NFC chip in the mobile device, and the SIM card slot 2 may be connected to a second power port VDD on the NFC chip. For such a mobile device having an NFC function, when two SIM cards are inserted in user equipment, an NFC card reading function may be implemented using any SIM card; and when the user inserts no SIM card, the NFC card reading function cannot be implemented. In FIG. 1, a switch S is further included. When the mobile device is powered on, a modem 2 supplies power to the SIM card slot 2. When the mobile device is powered off, the NFC chip supplies power to the SIM card slot 2.
NFC application programs in the mobile device may be executed by a main application program processor of the mobile device and stored in a main nonvolatile memory of the mobile device. Therefore, these NFC application programs are easily attacked. In addition, the main nonvolatile memory of the mobile device is generally insecure and cannot protect data stored in the main nonvolatile memory from being unintentionally deleted or intentionally manipulated. Generally, for this problem, a solution is to embed a secure element (SE) into the mobile device in a hardware module manner. The SE has a tamper-resistant device against an embedded microprocessor. Generally, the SE embedded in the hardware module manner is referred to as an embedded SE (eSE). Currently, the eSE is integrated into the NFC chip in the mobile device.
FIG. 2 shows a mobile device that is integrated with an NFC chip, supports dual SIM cards, and has an eSE. The NFC chip has only two power ports. Therefore, the NFC chip can supply power only to the eSE and one of SIM card slots. In FIG. 2, a SIM card slot 1 is connected to a first power port VCC, and the eSE is connected to a second power port VDD. In this way, a user can choose to perform an operation only on account information stored in a SIM card 1 inserted in the SIM card slot 1, or perform an operation only on account information stored in the eSE. For such a mobile device, when the user inserts no SIM card, an NFC card reading function may be implemented using the eSE; however, when the user inserts only one SIM card, when the SIM card is inserted in a SIM card slot 2, and if the mobile device is powered off, the mobile device cannot implement the NFC card reading function using the SIM inserted in the SIM card slot 2. That is, in this case, the user can implement the NFC card reading function only using the eSE. Therefore, for such a mobile device, when the user blindly mates a SIM card, and if the mobile device is powered off, the mobile device may implement the NFC card reading function only using the eSE.
In conclusion, when a mobile device is integrated with an NFC chip, supports dual SIM cards, and has an eSE, if a user blindly mates a SIM card, and when the mobile device is powered off, the mobile device may implement an NFC card reading function only using the eSE.